package com.catazy.cameralib.model

/**
 * 作者: Tao
 * 日期: 2024/3/7
 * 时间: 14:30
 * 描述: 扫描错误模型
 */
data class ScannerErrorModel(
    var errMsg: ErrorMessage? = null,
    var throwable: Throwable? = null
) {

    enum class ErrorMessage(val error: String) {
        TAKE_IMAGE_FROM_GALLERY_ERROR("从图库中获取图像错误"),
        PHOTO_CAPTURE_FAILED("照片拍摄失败"),
        CAMERA_USE_CASE_BINDING_FAILED("相机用例绑定失败"),
        DETECT_LARGEST_QUADRILATERAL_FAILED("检测最大四边形失败"),
        INVALID_IMAGE("无效图像"),
        CAMERA_PERMISSION_REFUSED_WITHOUT_NEVER_ASK_AGAIN("相机许可被拒绝"),
        CAMERA_PERMISSION_REFUSED_GO_TO_SETTINGS("相机权限被拒绝,请转到“设置”"),
        STORAGE_PERMISSION_REFUSED_WITHOUT_NEVER_ASK_AGAIN("存储许可被拒绝"),
        STORAGE_PERMISSION_REFUSED_GO_TO_SETTINGS("存储许可被拒绝,请转到“设置”"),
        CROPPING_FAILED("裁剪失败");
    }
}